import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

// 路由信息数组
const routes = [
  // 登录页路径
  {
    path: '/',
    component: () => import('@v/Login.vue')
  },
  // 后台管理布局页
  {
    path: '/layout',
    component: () => import('@v/Layout.vue'),
    children:[
      {
        path:'role',
        component:()=>import('@v/role/Role.vue')
      },
      {
        path:'manage',
        component:()=>import('@v/manage/Manage.vue')
      }
    ]
  },
  // 404页面
  {
    path:'*',//*号，表示剩余的全部情况
    component:()=>import('@v/Error404.vue')
  }
]


const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router





